;;;
;;;
;;;	Author:	Henry C. Francis
;;;		425 N. Ashe St.
;;;		Southern Pines, NC 28387
;;;		http://paracadd.com
;;;		All rights reserved.
;;;
;;;		COPYRIGHT: 
;;;		   EDITED: 
;;;
(DEFUN c:finddwg ()
  (SETQ folder_to_view (dos_getdir "Browse Folders" (GETVAR "DWGPREFIX") "Select Folder Look In" NIL))
  (IF folder_to_view
    (SETQ this_dwg_list (DOS_DIR (strcat (setq this_dir folder_to_view) "*.dwg")))
  )
  (IF this_dwg_list
    (SETQ fnd_dwg (dos_dwgpreview "Preview Drawings" (mapcar '(lambda (x) (STRCAT this_dir x)) this_dwg_list)))
  )
  (IF fnd_dwg
    (PROGN
      (IF (EQ (GETVAR "DBMOD") 0)
        (SETQ dis_chng (ukword 1 "Yes No" (STRCAT "Discard changes to " (getvar "dwgname")) (IF dis_chng dis_chng "No")))
        (SETQ dis_chng "No")
      )
      (IF (EQ (GETVAR "DBMOD") 0)
        (COMMAND ".open" fnd_dwg)
        (COMMAND ".open" dis_chng fnd_dwg)
      )
    )
  )
  (PRINC)
)
(DEFUN c:insertdwg ()
  (SETQ folder_to_view (dos_getdir "Browse Folders" (GETVAR "DWGPREFIX") "Select Folder Look In" NIL))
  (IF folder_to_view
    (SETQ this_dwg_list (DOS_DIR (strcat (setq this_dir folder_to_view) "*.dwg")))
  )
  (IF this_dwg_list
    (SETQ fnd_dwg (dos_dwgpreview "Preview Blocks" (mapcar '(lambda (x) (STRCAT this_dir x)) this_dwg_list)))
  )
  (IF fnd_dwg
    (PROGN
      (COMMAND ".insert" fnd_dwg)
    )
  )
  (PRINC)
)
 